home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / LGP250S1.ZIP / src / libgplus.5 / libgplus / gplus-in / curses.h < prev    next >
C/C++ Source or Header  |  1993-04-17  |  3KB  |  83 lines

  1. #ifndef _G_curses_h
  2.  
  3. #include <_G_config.h>
  4.  
  5. #if _G_HAVE_CURSES
  6.  
  7. #ifdef __curses_h_recursive
  8. #include_next <curses.h>
  9. #else
  10. #define __curses_h_recursive
  11.  
  12. extern "C" {
  13. #include_next <curses.h>
  14.  
  15. /* Some systems (SVR4 for example) allow the definition of CHTYPE to set the
  16.    type of some arguments to the curses functions.  It can be set to "char"
  17.    to save space, or it can be set to something longer to store both a
  18.    character and some attributes.  By default they do not define CHTYPE,
  19.    and when CHTYPE is not defined, the default type is "unsigned long" instead
  20.    of the traditional "char".  However, SVR4 <curses.h> does define
  21.    _VR3_COMPAT_CODE, so we can use that to detect when we should use the SVR4
  22.    default if CHTYPE is not defined.  For other systems, just default to the
  23.    traditional default "char". */
  24.  
  25. #ifdef CHTYPE
  26.       typedef CHTYPE _G_chtype;        /* Use specified type. */
  27. #else
  28. #ifdef _VR3_COMPAT_CODE
  29.       typedef unsigned long _G_chtype;    /* SVR4 default is "unsigned long" */
  30. #elif defined(hpux)
  31.       typedef unsigned int _G_chtype;
  32. #else
  33.       typedef char _G_chtype;        /* Traditional default is "char" */
  34. #endif
  35. #endif
  36.  
  37. /* Some args are conceptually const, but SVR4 (and others?) get it wrong. */
  38. #define _C_const /* const */
  39.  
  40. WINDOW * (newwin)(int, int, int, int);
  41. WINDOW * (subwin)(WINDOW *, int, int, int, int);
  42. WINDOW * (initscr)();
  43. int      (box) (WINDOW*, _G_chtype, _G_chtype);
  44. int      (delwin)(WINDOW*);
  45. int      (getcurx)(WINDOW*);
  46. int      (getcury)(WINDOW*);
  47. int      (mvcur)(int, int, int, int);
  48. int      (overlay)(WINDOW*, WINDOW*);
  49. int      (overwrite)(WINDOW*, WINDOW*);
  50. int      (scroll)(WINDOW*);
  51. int      (touchwin)(WINDOW*);
  52. int      (waddch)(WINDOW*, _G_chtype);
  53. int      (waddstr) _G_ARGS((WINDOW*, const char*));
  54. int      (wclear)(WINDOW*);
  55. int      (wclrtobot)(WINDOW*);
  56. int      (wclrtoeol)(WINDOW*);
  57. int      (wdelch)(WINDOW*);
  58. int      (wdeleteln)(WINDOW*);
  59. int      (werase)(WINDOW*);
  60. int      (wgetch)(WINDOW*);
  61. int      (wgetstr)(WINDOW*, char*);
  62. int      (winsch)(WINDOW*, _G_chtype);
  63. int      (winsertln)(WINDOW*);
  64. int      (wmove)(WINDOW*, int, int);
  65. int      (wrefresh)(WINDOW*);
  66. int      (wstandend)(WINDOW*);
  67. int      (wstandout)(WINDOW*);
  68.  
  69. // SVR4 rather inanely bundles the format-string parameter with the '...'.
  70. // This breaks VMS, and I don't want to penalize VMS for being right for once!
  71.  
  72. int      (wprintw)(WINDOW*, _G_CURSES_FORMAT_ARG ...);
  73. int      (mvwprintw)(WINDOW*, int y, int x, _G_CURSES_FORMAT_ARG ...);
  74. int      (wscanw)(WINDOW*, _G_CURSES_FORMAT_ARG ...);
  75. int      (mvwscanw)(WINDOW*, int, int, _G_CURSES_FORMAT_ARG ...);
  76. int      (endwin)();
  77.  
  78. }
  79. #define _G_curses_h
  80. #endif
  81. #endif /* _G_HAVE_CURSES */
  82. #endif /* _G_curses_h */
  83.